<template>
    <div class="not-found">
        <div class="not-found-content">
            <div class="error-code">404</div>
            <h1>页面不存在</h1>
            <p>抱歉，您访问的页面不存在或已被删除。</p>
            <div class="actions">
                <el-button type="primary" @click="goHome">返回首页</el-button>
                <el-button @click="goBack">返回上页</el-button>
            </div>
        </div>
    </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'

const router = useRouter()

const goHome = () => {
    router.push('/')
}

const goBack = () => {
    router.go(-1)
}
</script>

<style scoped>
.not-found {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.not-found-content {
    text-align: center;
    background: white;
    padding: 60px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
}

.error-code {
    font-size: 120px;
    font-weight: bold;
    color: #409eff;
    margin-bottom: 20px;
    line-height: 1;
}

.not-found-content h1 {
    color: #333;
    margin-bottom: 15px;
    font-size: 32px;
    font-weight: 600;
}

.not-found-content p {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.5;
}

.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .not-found-content {
        padding: 40px 20px;
    }

    .error-code {
        font-size: 80px;
    }

    .not-found-content h1 {
        font-size: 24px;
    }

    .actions {
        flex-direction: column;
        align-items: center;
    }

    .actions .el-button {
        width: 200px;
    }
}
</style>
